<?php $this->layout = 'futuretweet'; ?>
<html>
    <h1><center>Future Timeline</center></h1>
    <table>
        
        
        <!-- Here is where we loop through the posts array passed from the
            controller printing out the data related to each tweet-->
            
        <?php foreach($result as $field):?>
		
        
        <tr style="background-color:#FFFFFF">
            <td><?php echo $field['User']['username'].': '.$field['FutureTweet']['tweetText'].' '.$field['FutureTweet']['release_date'];?></td>
        </tr>
       <!-- <td>
            <button type="button" onclick="displayDate()">Edit</button>
            <button type="button" onclick="displayDate()">Delete</button>
        </td>-->

        
        <?php endforeach;?>
        
            <h3>
            <p>Filter Tweets:
                <?php echo $this->Html->link('All', array('action' => 'viewAll1' ));?>
                <?php echo $this->Html->link('Approved', array('action' => 'viewApproved1' ));?>
                <?php echo $this->Html->link('Rejected', array('action' => 'viewRejected1' ));?>
                <?php echo $this->Html->link('Pending', array('action' => 'viewPending1' ));?>
                
            </p>
            <hr />
            </h3>

            <?php echo $this->Html->link('View my own tweets', array('action' => 'viewMyTweets' )). "&nbsp;&nbsp;&nbsp;&nbsp;";?>
        
            <?php echo $this->Html->link('Post Tweet Now', array('action' => 'PostTweet')) . "&nbsp;&nbsp;&nbsp;&nbsp;"; ?>
        
            <?php echo $this->Html->link('Post Tweet later', array('action' => 'PostTweetLater')) . "&nbsp;&nbsp;&nbsp;&nbsp;"; ?>
            
            
        
     
            
    </table>

</html>